/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.*;

/**
 * <p>Project: javase - List3
 * <p>Powered by webrx On 2021-12-08 19:43:15
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class List3 {
    public static void main(String[] args) {
        //red 1-33 (6)
        //blue 1-16 (1)
        Random rand = new Random();
        List<Integer> ball = new ArrayList<>();
        while (true) {
            int t = rand.nextInt(33) + 1;//1-33
            if (ball.contains(t)) continue;
            ball.add(t);
            if (ball.size() == 6) break;
        }
        System.out.println(ball);
        Collections.sort(ball);
        System.out.println();
        System.out.print(ball);

        Integer blue = rand.nextInt(16) + 1;
        System.out.print(List.of(blue));

        //ball.get(8);
        //ball.remove(9);

    }
}
